CPS Transform for Dependent ML
نویسندگان
چکیده
Dependent ML is a functional programming language that extends ML with a restricted form of dependent types. In this paper, we study a call-by-value continuation-passing style (CPS) transform for ML 0 , a core of DML that excludes effects. In particular, we demonstrate how the type derivation of an expression in ML 0 can be transformed into the type derivation of the CPS transform of the expression, lifting CPS transform from the level of expressions to the level of type derivations. This work serves as the first step in our attempt to build a type-preserving compiler for DML by compiling the type derivation of a program instead of the program itself.
منابع مشابه
Proving Syntactic Properties of Exceptions in an Ordered Logical Framework
We formally prove the stackability and linearity of exception handlers with ML-style semantics using a novel proof technique via an ordered logical framework (OLF). We rst transform exceptions into continuation-passing-style (CPS) terms and formalize the exception properties as a judgement on the CPS terms. Then, rather than directly proving that the properties hold for terms, we prove our theo...
متن کاملProving Exception Stackability and Linearity in an Ordered Logical Framework
We formally prove the stackability and linearity of exception handlers of ML-style semantics using a novel proof technique via an ordered logical framework (OLF). We first transform exceptions into continuation-passing-style (CPS) terms and formalize the exception properties as a judgement on the CPS terms. Then, rather than directly proving that the properties hold for terms, we prove our theo...
متن کاملAn Initial Model for the Monadic Calculus
When it comes to compiler design, there has been a dispute as to whether it is useful to transform the source code using the continuation passing style (CPS) transform first. Some have observed that it is easier to optimize CPS transformed code, while others maintain that direct style compilation is better. Sabry and Felleisen resolve the dispute by showing how get the benefits of CPS without t...
متن کاملAssessing the Overhead of ML Exceptions by Selective CPS Transformation
ML’s exception handling makes it possible to describe exceptional execution flows conveniently, but it also forms a performance bottleneck. Our goal is to reduce this overhead by source-level transformation. To this end, we transform source programs into continuation-passing style (CPS), replacing handle and raise expressions by continuationcatching and throwing expressions, respectively. CPS-t...
متن کاملImmune response to type III group B streptococcal polysaccharide-tetanus toxoid conjugate vaccine.
Group B Streptococcus (GBS) is an important perinatal pathogen. Because transplacentally acquired maternal antibodies to the GBS capsular polysaccharides (CPS) confer protection, prevention of infant disease may be possible after immunization of women. Unfortunately, the purified CPS of GBS are only variably immunogenic in adults; therefore to enhance immunogenicity we have designed and develop...
متن کامل